<?php
/**
 *
 * User: anker
 * Date: 4/24/22
 * Email: <13408046898@163.com>
 **/

use think\facade\Route;

//必须登录
Route::group(function () {

    // 退出登陆
    Route::rule("logout", "admin/logout", "POST");
    // 科目列表
    Route::rule("subject", "study/subject", "get");

    // 班级列表
    Route::rule("classes", "student/classes", "get");
    // 新增班级
    Route::rule("add_classes", "student/add_classes", "post");
    // 删除某个班级
    Route::rule("del_classes", "student/del_classes", "post");
    // 修改某个班级
    Route::rule("edit_classes", "student/edit_classes", "post");

    // 学生列表
    Route::rule("student", "student/student", "get");
    // 新增学生
    Route::rule("add_student", "student/add_student", "post");
    // 删除某个学生
    Route::rule("del_student", "student/del_student", "post");
    // 修改某个学生
    Route::rule("edit_student", "student/edit_student", "post");
    // 学生签到
    Route::rule("sign_in_student", "student/sign_in_student", "post");

    // 课件列表
    Route::rule("courseware", "study/courseware", "get");
    // 获取单个课件
    Route::rule("one_courseware", "study/one_courseware", "get");
    // 新增课件
    Route::rule("add_courseware", "study/add_courseware", "post");
    // 删除某个课件
    Route::rule("del_courseware", "study/del_courseware", "post");
    // 修改某个课件
    Route::rule("edit_courseware", "study/edit_courseware", "post");

    // 习题列表
    Route::rule("exercises", "study/exercises", "get");
    // 习题列表 根据科目id不分页 获取所有
    Route::rule("exercises_all", "study/exercises_all", "get");
    // 获取单个习题
    Route::rule("one_exercises", "study/one_exercises", "get");
    // 新增习题
    Route::rule("add_exercises", "study/add_exercises", "post");
    // 删除某个习题
    Route::rule("del_exercises", "study/del_exercises", "post");
    // 修改某个习题
    Route::rule("edit_exercises", "study/edit_exercises", "post");

    // 课堂作业列表
    Route::rule("classwork", "study/classwork", "get");
    // 获取单个课堂作业
    Route::rule("one_classwork", "study/one_classwork", "get");
    // 新增课堂作业
    Route::rule("add_classwork", "study/add_classwork", "post");
    // 删除某个课堂作业
    Route::rule("del_classwork", "study/del_classwork", "post");
    // 修改某个课堂作业
    Route::rule("edit_classwork", "study/edit_classwork", "post");

    // 学习报告列表
    Route::rule("study_report", "study/study_report", "get");
    // 获取单个学习报告
    Route::rule("one_study_report", "study/one_study_report", "get");
    // 修改某个学习报告
    Route::rule("edit_study_report", "study/edit_study_report", "post");
    // 删除某个学习报告
    Route::rule("del_study_report", "study/del_study_report", "post");

    // 科目列表
    Route::rule("subject", "study/subject", "get");



    // 上传文件 暂时不用
    Route::rule("upload_file", "common/upload_file", "post");

})->middleware(\app\admin\middleware\Auth::class);


//不用登录
Route::group(function () {
    //密码登录
    Route::rule("login", "admin/login", "POST");

})->middleware(\app\admin\middleware\Api::class);